package com.hxzy.shop.controller.commodity;


import com.hxzy.shop.dto.commodity.req.EditPrescriptionReviewSettingsReq;
import com.hxzy.shop.entity.PrescriptionReviewSettings;
import com.hxzy.shop.feign.commodity.CommodityFeign;
import com.hxzy.shop.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "商户处方审核配置")
@RestController
@RequestMapping("prescriptionReviewSettings")
public class PrescriptionReviewSettingsController {

    @Resource
    private CommodityFeign commodityFeign;
    @ApiModelProperty("获取商户的处方审核配置")
    @PostMapping("/getPrescriptionReviewSettings")
    public Result<PrescriptionReviewSettings> getPrescriptionReviewSettings(){
        return commodityFeign.getPrescriptionReviewSettings();
    }

    @ApiModelProperty("获取商户的处方审核配置")
    @PostMapping("/editPrescriptionReviewSettings")
    public Result<Boolean> editPrescriptionReviewSettings(@RequestBody EditPrescriptionReviewSettingsReq req){
        return commodityFeign.editPrescriptionReviewSettings(req);
    }
}
